﻿/*
 * adc_router.c
 *
 * Created: 03.04.13 22:30:27
 *  Author: ЖЕНЯ
 */ 


#include "adc_router.h"

void InitADC()
{
	// AVCC with external capacitor at AREF pin
	ADMUX	|=	(1<<REFS0);
	
	///ADCSRA	|= ((1<<ADIE));
	
	//Set the ADC voltage reference to AVCC (Analog voltage in)
	ADMUX = _BV(REFS0);
	
	//Enable the ADC and set PS.
	ADCSRA = _BV(ADEN)|_BV(ADPS2)|_BV(ADPS1)|_BV(ADPS0); 
	
	/*
	ADCSRA |= 1<<ADSC;		// Start Conversion
	*/
}

// PF0 (ADC0)
// PF2 (ADC2)
SIGNAL(SIG_ADC)
{
	return;
}